<!--富文本编辑器开始-->
{if in_array('morecontents',$isdisplay_array) or in_array('twocontents',$isdisplay_array)}
    <script type="text/javascript">
    {for start="1" end="4"}
    function ShowUeditor{$i}a(){
        var url = '/api/ueditor/index.html?app=admin';
        var ue = UE.getEditor('content{$i}a',{
            serverUrl :url,
            UEDITOR_HOME_URL:'{:config('template.ueditor')}/',
            {if $Request.isMobile}
            toolbars:[
                ['source','undo','redo','justifyleft','justifycenter','justifyright','bold','italic','underline','strikethrough','link','unlink','insertcode','fontfamily','fontsize','forecolor','backcolor','simpleupload','insertimage','attachment','spechars','map','insertvideo','music','scrawl']
            ],
            'enterTag': 'br',//把换行P改为br
            allowDivTransToP:false,//div自动转为p标签设为false：不转换
            {/if}
        });
        ue.ready(function(){
            ue.execCommand('serverparam', {
            'userid': {:session('userid')},
            });
        });
        if(content{$i}a.style.display == 'block'){
            content{$i}a.style.display = 'none';
        }else{
            content{$i}a.style.display = 'block';
        }
    }
    {/for}
    </script>
{/if}
{if in_array('onecontent',$isdisplay_array)}
    <script type="text/javascript">
        var url = '/api/ueditor/index.html?app=admin';
        var ue = UE.getEditor('content1a',{
            serverUrl :url,
            UEDITOR_HOME_URL:'{:config('template.ueditor')}/',
            'enterTag': 'br',//把换行P改为br
            allowDivTransToP:false,//div自动转为p标签设为false：不转换
        });
        ue.ready(function(){
            ue.execCommand('serverparam', {
            'userid': {:session('userid')},
            });
        });
    </script>
{/if}
<!--富文本编辑器结束-->